// 首页
<template>
  <div>
    <div>首页~</div>
    <button @click="btn">局部加载</button>
    <div v-load="loads"></div>
  </div>
</template>

<script>
export default {
  data() {
    return {
      loads: false,
    };
  },

  mounted() {},

  methods: {
    btn() {
      this.loads = true;
      var timer = setTimeout(() => {
        this.loads = false;
        clearTimeout(timer);
        timer = null;
      }, 1000);
    },
  },
};
</script>

<style scoped></style>
